import { Map } from "../Map";
import { Layer } from "./../layer/Layer";
export class MapRenderer {
  private layerRendererConstructors_: Array<any>;
  constructor(map: Map) {
    this.layerRendererConstructors_ = [];
  }

  public registerLayerRenderers(constructors) {
    this.layerRendererConstructors_.push.apply(
      this.layerRendererConstructors_,
      constructors
    );
  }

  public getLayerRenderer(layer: Layer) {
    if (this.layerRendererConstructors_.length)
      return this.layerRendererConstructors_[0];
    return null;
  }
}
